package com.hhl.flower.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hhl.flower.pojo.entity.Address;

import java.util.List;

/**
* @author Liubuzhu
* @description 针对表【address】的数据库操作Service
* @createDate 2024-06-12 14:38:37
*/
public interface AddressService extends IService<Address> {

	/**
	 * 获取用户的所有地址
	 * @param userId
	 * @return
	 */
	List<Address> getAddressByUser(Integer userId);

	/**
	 * 添加地址
	 * @param userId
	 * @param consignee
	 * @param phone
	 * @param detail
	 * @param isDefault
	 */
	void addAddress(Integer userId, String consignee, String phone, String detail, Integer isDefault);

	/**
	 * 删除地址
	 * @param userId
	 * @param addressId
	 */
	void deleteAddress(Integer userId, Integer addressId);

}
